package com.hlhj.funlike_business.presenter;

import android.content.Context;

import com.example.mymvp.mvp.BasePresenter;
import com.hlhj.funlike_business.bean.MsgBean;
import com.hlhj.funlike_business.bean.ShopInfoBean;
import com.hlhj.funlike_business.bean.TakeTypeBean;
import com.hlhj.funlike_business.bean.UpImgBean;
import com.hlhj.funlike_business.moudle.SettingsMoudle;
import com.hlhj.funlike_business.views.SettingsView;

import java.io.File;
import java.util.List;

public class SettingsPresenter extends BasePresenter<SettingsMoudle,SettingsView> implements SettingsMoudle.getResult {
    @Override
    public void createModule() {
        module = new SettingsMoudle();
        module.setLisenter(this);
    }

    public void LoadTimeResult(Context context,String business_start,String business_end){
        module.LoadTimeResule(context,business_start,business_end);
    }

    public void LoadTakeType(Context context){
        module.LoadTakeType(context);
    }

    public void LoadSetTakeResult(Context context,int distribution,String freight,int freight_long){
        module.LoadSetTakeResult(context,distribution,freight,freight_long);
    }

    public void LoadShopInfo(Context context){
        module.LoadShopInfo(context);
    }

    public void LoadUpImgResult(Context context,File shop){
        module.LoadUpImgResult(context,shop);
    }

    @Override
    public void loadTimeResult(MsgBean msgBean) {
        getView().showTimeResult(msgBean);
    }

    @Override
    public void loadTakeType(List<TakeTypeBean.DataBean> dataBeans) {
        getView().showTakeType(dataBeans);
    }

    @Override
    public void loadSetTakeResult(MsgBean msgBean) {
        getView().showSetTakeResult(msgBean);
    }

    @Override
    public void loadShopInfo(ShopInfoBean.DataBean dataBean) {
        getView().showShopInfo(dataBean);
    }

    @Override
    public void loadUpImgResult(UpImgBean.DataBean dataBeans) {
        getView().showUpImgResult(dataBeans);
    }


}
